<%@page language="java" session="true" pageEncoding="GBK"%>
<%@page import="ext.csc.component.numbergen.number.FormatedNumber"%>
<%@page import="ext.csc.component.numbergen.classification.Classification"%>
<%@page import="ext.csc.component.numbergen.classification.ClassificationInfoContained"%>
<%@page import="ext.csc.component.numbergen.number.NumberRegister"%>
<%@page import="ext.csc.component.numbergen.bean.PropertiesBean"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="wt.session.SessionHelper"%>
<%
	String parentClassPath = request.getParameter("parentPath");
	String fullClassPath = request.getParameter("fullPath");
	String generatedNumber = request.getParameter("gnumber");
	String objectName = request.getParameter("objectname");
	String requestdesc = request.getParameter("requestdesc");
	int requestvolumn = Integer.parseInt(request.getParameter("requestvolumn"));
	
	ClassificationInfoContained classification = new Classification();
	classification.setObjectname(objectName);
	classification.setObjectclasspath(fullClassPath);
	//classification.setObjectclasspath(parentClassPath);
	classification.setObjectclassvalue("");
	classification.setObjectclassdesc("");
	
	FormatedNumber fnumber = new FormatedNumber();
	fnumber.setClassification(classification);
	fnumber.setValue(generatedNumber);
	SimpleDateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd" + " " + "hh:mm:ss");
	String datetime = tempDate.format(new java.util.Date());
	fnumber.setDateTime(datetime);
	fnumber.setRequestDesc(requestdesc);
	fnumber.setRequestor(SessionHelper.manager.getPrincipal().getName());
	
	PropertiesBean pb = new PropertiesBean();
	NumberRegister register = new NumberRegister(pb,fnumber);
	register.registerNumbers(requestvolumn);
%>

<script>window.location="numberGen.jsp"</script>
	